package com.example.download.utils;

import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;

/**
 * @author: Mr.You
 * @create: 2022-11-17 10:19
 * @description:
 **/
public class BaseDialog extends DialogFragment {

    public BaseDialog() {
        super();
    }

    public BaseDialog(int contentLayoutId) {
        super(contentLayoutId);
    }

    @Override
    public void show(FragmentManager manager, String tag) {
        if (manager != null) {
            FragmentTransaction ft = manager.beginTransaction();
            ft.add(this, tag);
            ft.commitAllowingStateLoss();
        }
    }
}
